package cn.com.zcode.exam.model;

import java.util.Date;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import cn.com.zcode.core.model.BaseModelSupport;
import cn.com.zcode.user.model.User;

public class Paper extends BaseModelSupport {
	private static final long serialVersionUID = 1L;
	public static final String PAPER_WRONG_INFO = "00000000000000000000000000000000";
	public static final int STATE_WRONG = -1;
	public static final int STATE_PUBLIC = 0;
	public static final int STATE_PRIVATE = 1;
	private String title;
	private String type;
	private int state;
	private boolean main;
	private int orderIndex=0;
	private Date createDate;
	private User creater;
	private Set<Question> questions = new LinkedHashSet<Question>();

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Set<Question> getQuestions() {
		return questions;
	}

	public void setQuestions(Set<Question> questions) {
		this.questions = questions;
	}

	public void addQuestions(List<Question> questions) {
		if(questions!=null){
			this.questions.addAll(questions);
		}
	}

	 

	public User getCreater() {
		return creater;
	}

	public void setCreater(User creater) {
		this.creater = creater;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public boolean isMain() {
		return main;
	}

	public void setMain(boolean main) {
		this.main = main;
	}

	public int getOrderIndex() {
		return orderIndex;
	}

	public void setOrderIndex(int orderIndex) {
		this.orderIndex = orderIndex;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


}
